<?php
// +----------------------------------------------------------------------
// | WoShiMaiJia Projcet 
// +----------------------------------------------------------------------
// | Copyright (c) 2010-2011 http://woshimaijia.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: xinqiyang <xinqiyang@gmail.com>
// +----------------------------------------------------------------------

class ProductLogic extends BaseService
{
	public static function addProduct($data)
	{
		if(!empty($data)){
			return self::add('product', $data);
		}
		return false;
	}
	
	public static function getProduct()
	{
		$time = strtotime(date('y-m-d',time()));
		return self::gets('product', "id>0 order by id desc limit 30",'id,title,image,titleextend');
	}
	
	
	

}
